public class Main extends ProcessFileMain {

	public Main(String[] args) throws Throwable {
		super(args);
	}

	@Override
	public void processFirstLine(String input) throws Throwable {
		if ("".equals(input)) return;
		write('"' + mod(input) + '"');
	}
	
	private String mod(String input) {
		return input.replace('"', '\'');
	}

	@Override
	protected void processLine(String input) throws Throwable {
		if ("".equals(input)) return;
		write(",\r\n \"" + mod(input) + '"');
	}

	@Override
	public void startup() throws Throwable {
		write("<html>\n<style>");
		write("input {font-size:35;}");
		write("body {text-align:center;");
		write("font-size:35;}</style><script>");
		write("var lines=new Array(");

	}

	@Override
	public void endup() throws Throwable {
		write(");\r\nfunction newOne() {");
		write("indix = Math.floor(Math.random()*lines.length);");
		write("display.innerHTML=lines[indix];}</script>");
		write("<input type=\"button\" value=\"again\"/");
		write("onclick=\"newOne()\"><br><br><br><br><br>");
		write("<div id=\"display\"></html>");	
	}

	public static void main(String[] args) throws Throwable {
		new Main(args).execute();
	}
}
